package myException;

public class Test1 {
    public static void main(String[] args) {
        test(-1);
        Integer integer = null;
    }

    /*
    throw 抛出异常
     */
    static void test(int a) {
        if (a < 0) throw new RuntimeException("不可传入负数");
    }

}
